Skip to content

Support multiword mention autocomplete sessions - #2345

Merged
ymichael merged 8 commits into
get-bb:mainfrom
jshph:fix/spaced-mention-autocomplete
Aug 25, 2026
Merged

Support multiword mention autocomplete sessions#2345
ymichael merged 8 commits into
get-bb:mainfrom
jshph:fix/spaced-mention-autocomplete

Conversation

@jshph

@jshph jshph commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

What was wrong

The prompt mention trigger scanner treated every space as the end of an @ query. Thread matching already supported multiword titles, but the editor stopped dispatching the query at the first space, so those matches were unreachable.

Extending a dismissed multiword occurrence could also reopen autocomplete because dismissal was tied to the original text range. Touch layouts had no explicit way to dismiss results while preserving the typed text, and deleting then retyping a dismissed occurrence could leave the new occurrence suppressed.

What changed

Mention queries now preserve ordinary spaces verbatim. Tabs, newlines, punctuation handling, the initially highlighted result, Enter, Tab, matching, and ranking retain their previous behavior.

Dismissal now follows the same trigger occurrence as its text grows. Removing or replacing that occurrence clears the dismissal so a newly typed @ can trigger autocomplete again.

Coarse-pointer layouts get a 44×44 Close suggestions target. It shares the first section/status row rather than adding a separate header, preserving the touch target without extra vertical space. Desktop menus remain unchanged.

No wire contracts or protocol versions changed.

How you verified

pnpm exec turbo run test --filter=@bb/client-core -- --run test/find-active-trigger.test.ts
pnpm exec turbo run test --filter=@bb/app -- --run src/components/promptbox/PromptBoxInternal.test.tsx
pnpm exec turbo run typecheck --filter=@bb/client-core --filter=@bb/app
pnpm exec turbo run lint --filter=@bb/app
pnpm exec oxfmt --check apps/app/src/components/promptbox/PromptBoxInternal.test.tsx apps/app/src/components/promptbox/PromptBoxInternal.tsx apps/app/src/components/promptbox/mentions/MentionMenu.tsx packages/client-core/src/prompt/mentions/find-active-trigger.ts packages/client-core/test/find-active-trigger.test.ts
git diff --check
  • Client-core trigger scanner: 12 tests passed.
  • PromptBox: 108 tests passed.
  • App and client-core typechecks passed.
  • App lint reported 181 pre-existing warnings and zero errors.
  • Browser QA confirmed multiword lookup, unchanged Enter application, persistent Escape/touch dismissal while typing, 44×44 touch close sizing, and successful retrigger after deleting and retyping the occurrence.

Fixes: N/A (no linked issue).

AGENT GENERATED

@ymichael ymichael self-assigned this Aug 25, 2026
@ymichael
ymichael force-pushed the fix/spaced-mention-autocomplete branch from 722353e to 5d3f6a3 Compare August 25, 2026 20:33
@ymichael
ymichael merged commit ce74ca6 into get-bb:main Aug 25, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants